package com.telit.firecommand.config;

import com.hikvision.artemis.sdk.config.ArtemisConfig;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.Map;


@Component
public class HikVisionConfig {

    @Value("${fire.haikang.host}")
    private String host;

    @Value("${fire.haikang.appKey}")
    private String appKey;

    @Value("${fire.haikang.appSecret}")
    private String appSecret;

    public final static String MIME = "application/json";


    @PostConstruct
    public void init() {
        ArtemisConfig.host = host;
        ArtemisConfig.appKey = appKey;
        ArtemisConfig.appSecret = appSecret;
    }

    public static Map<String, String> getUrl(String path) {
        Map<String, String> map = new HashMap<>(2);
        map.put("https://", path);
        return map;
    }

}
